package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.ItemTypeEnumForSource;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.RFavoriteSource;
import com.jilefojing.beans.pojos.enhanced.EnhancedRFavoriteSource;
import com.jilefojing.beans.query.RFavoriteSourceQuery;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年07月23日 02时21分15秒
 */
public interface IRFavoriteSourceService extends IBaseService<RFavoriteSource> {

	Pagination<EnhancedRFavoriteSource> getPagination(RFavoriteSourceQuery rFavoriteSourceQuery, Pagination<EnhancedRFavoriteSource> pagination, UserContext userContext);

	RFavoriteSource add(RFavoriteSource rFavoriteSource, UserContext userContext) throws UserContextException;

	void cancleByItem(RFavoriteSource rFavoriteSource, UserContext userContext) throws UserContextException;

	void cancleById(long id, UserContext userContext) throws UserContextException;

	EnhancedRFavoriteSource getEnhancedRFavoriteSourceByItemForUser(ItemTypeEnumForSource itemType, long itemId, UserContext userContext);

	List<EnhancedRFavoriteSource> getEnhancedRFavoriteSourcesByItemsForUser(ItemTypeEnumForSource itemType, List<Long> itemIds, UserContext userContext);

	List<EnhancedRFavoriteSource> conventRFavoriteSources2EnhancedRFavoriteSources(List<RFavoriteSource> rFavoriteSources);

}
